IoErr = -132; ... ; subroutine not complete need Print routine and initialization
directory;: ;* Table of Content of DF0:
move.l dosbase,a6 ;DOS-Base address in A6
move.l #name,d1 ;pointer to Path-/Filename move.l #-2,d2 ;Mode "Read" jsr Lock(a6) ;search for file tst.l d0 ;found ? beq Error ;no ! move.l d0,locksav ;otherwise save key move.l dosbase,a6 ;DOS-Base address move.l locksav,d1 ;Key in D1 move.l #fileinfo,d2 ;pointer to FileInfoBlock jsr Examine(a6) ;Get Disk-Name tst.l d0 ;OK? beq error ;no (occurs rarely) bra output ;otherwise output Name loop: ;* Read Filenames move.l dosbase,a6 ;DOS-Base address move.l locksav,d1 ;Key in D1 move.l #fileinfo,d2 ;pointer to FileInfoBlock jsr ExNext(a6) ;search for next file tst.l d0 ;found ? beq error ;no: Endoutput: ;* Output Name
bsr Print ;Output/evaluate Name etc. bra loop ;and continue ...error: ;* Determine I/O-Status move.l dosbase,a6 ;DOS-Base address in A6 jsr IoErr(a6) ;Get Status rts ;End...name: dc.b 'DF0:',0 align ; some assemblers use even